<template>
  <!-- ---采购管理   -->
  <div class="incolumn">
    <div class="incolumn_countr">
      <div class="block">
        <el-form :inline="true" :model="formInline" class="demo-form-inline">
          <el-form-item label="输入搜索" class="s1">
            <el-input v-model="Pagination.key" placeholder="请输入合作公司" style="width:150%"></el-input>
          </el-form-item>
          <el-form-item label="输入时间" label-width="230px">
            <el-date-picker
              v-model="formInline.time1"
              type="daterange"
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              @change="chage"
            ></el-date-picker>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="onsubmit">查询</el-button>
          </el-form-item>
          <el-button class="ebtn" type="warning" @click="Newly">新增采购</el-button>
        </el-form>
      </div>
    </div>
    <div>
    </div>
    <!-- =============列表页表单 ================= -->
    <div class="incolumn_from">
      <el-table
        :data="tableDataBs"
        style="width: 100%;background-color:#fff"
        :height="autoHeightTable"
        stripe
      >
        <el-table-column prop label="序号" align="center" type="index" width="70"></el-table-column>
        <el-table-column prop="orderNumber" label="订单编号" align="center"></el-table-column>
        <el-table-column prop="supplierName" label="供应商名称" align="center"></el-table-column>
        <el-table-column prop="createonTime" label="采购时间" align="center">
          <template v-slot="scope">
            <span>{{ renderTime(scope.row.createonTime) }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="states" label="状态" align="center">
          <template v-slot="scope">
            <span v-show="scope.row.status==0">待执行</span>
            <span v-show="scope.row.status==1">待审核</span>
            <el-button v-if="scope.row.status == 2" type="text" size="medium"
                       @click="getBOhui(scope.row.checkflowId)">驳回
            </el-button>
<!--            <span v-show="scope.row.status==2">驳回</span>-->
            <span v-show="scope.row.status==3">待收货</span>
            <span v-show="scope.row.status==4">已完成</span>
          </template>
        </el-table-column>
        <el-table-column label="操作" width="200" align="center">
          <template slot-scope="scope">
            <!-- <el-button @click="th" type="primary" size="small">退货</el-button> -->
            <el-button
              type="primary"
              size="small"
              v-show="scope.row.status ==3"
              @click="details(scope.row.id,1)"
            >申请入库
            </el-button>
            <!-- <el-button @click="xjd" type="primary" size="small">询价单</el-button> -->
            <el-button type="text" size="small" @click="details(scope.row.id,2)">详情</el-button>
          </template>
        </el-table-column>
      </el-table>
      <div class="bottom_slate">
        <el-pagination
          background
          layout="prev, pager, next"
          :current-page="Pagination.current"
          :page-size="Pagination.pagesize"
          @current-change="handleCurrentChange"
          :page-count="Pagination.total"
        ></el-pagination>
      </div>
      <!-- ====================弹框集中地================================================================================================ -->
      <!--  ============== 新增采购弹框 ================================================ -->
      <el-dialog :visible.sync="dialogTableVisible" :modal-append-to-body="false" width="1300px">
        <div class="from_bt">新增采购</div>
        <br/>
        <p class="Purchase_Division"></p>
        <br/>
        <el-row :gutter="32">
          <el-col :span="6">
            <el-form class="demo-form-inline" label-width="83px">
              <el-form-item label="供应商">
                <el-select value-key="id" v-model="enterpriseNumberSeced" @change="currentSupplierSec">
                  <el-option
                    v-for="item in options_supplier"
                    :key="item.id"
                    :label="item.enterpriseName"
                    :value="item.enterpriseNumber"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-form>
          </el-col>
          <el-col :span="12">
            <el-form :inline="true" class="demo-form-inline" label-width="83px">
              <el-form-item label="订单编号">
                <el-input v-model="orderNo"></el-input>
              </el-form-item>
              <el-form-item>
                <el-button plain type="primary" @click="addRow">新增</el-button>
              </el-form-item>
            </el-form>
          </el-col>
        </el-row>
        <el-table
          :data="tableData_PRODUCT"
          style="width: 100%;background-color:#fff"
          height="400"
          :max-height="400"
          stripe
        >
          <el-table-column type="selection" width="55"></el-table-column>
          <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
          <el-table-column label="产品图号" align="center" width="200">
            <template slot-scope="scope">
              <el-select v-model="scope.row.productTuHaoSec" @change="currentProductSec($event,scope.$index)"
                         placeholder="请选择">
                <el-option
                  v-for="item in options_ownProduct"
                  :key="item.id"
                  :label="item.productTuhao"
                  :value="item.productTuhao"
                ></el-option>
              </el-select>
            </template>
          </el-table-column>
          <el-table-column label="产品名称" align="center">
            <template slot-scope="scope">
              <el-input disabled v-model="scope.row.productName"></el-input>
            </template>
          </el-table-column>
          <el-table-column label="单价(元)" align="center">
            <template slot-scope="scope">
              <el-input disabled v-model="scope.row.price"></el-input>
            </template>
          </el-table-column>
          <el-table-column label="采购数量" align="center">
            <template slot-scope="scope">
              <el-input @input="countXiaoJi(scope.$index)" v-model="scope.row.number"></el-input>
            </template>
          </el-table-column>
          <el-table-column prop label="小计(元)" align="center">
            <template slot-scope="scope">
              <el-input disabled v-model="scope.row.total"></el-input>
            </template>
          </el-table-column>
          <el-table-column label="到货时间" align="center" width="170">
            <template slot-scope="scope">
              <el-date-picker
                v-model="scope.row.planArrivalTime"
                type="date"
                value-format="yyyy-MM-dd"
                placeholder="选择日期"
                style="width: 150px">
              </el-date-picker>
            </template>
          </el-table-column>
          <el-table-column label="提前提醒" align="center">
            <template slot-scope="scope">
              <el-select v-model="scope.row.tiqianTixing">
                <el-option
                  v-for="item in optionsBp"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </template>
          </el-table-column>
          <el-table-column label="操作" align="center" width="100">
            <template slot-scope="scope">
              <el-button
                type="danger"
                icon="el-icon-delete"
                @click="resetForm(scope)"
                size="small"
              ></el-button>
            </template>
          </el-table-column>
        </el-table>
        <br/>
        <div class="from_tab_btn">
          <el-button @click="savePurchase" type="primary" size="small">确认</el-button>
          <el-button @click="dialogTableVisible = false" type="info" size="small">取消</el-button>
        </div>
      </el-dialog>
      <!-- ===================详情弹框================================================= -->
      <el-dialog :visible.sync="dialogBatab" :modal-append-to-body="false" width="1200px">
        <div class="from_cg">采购详情</div>
        <br/>
        <p class="Purchase_Division"></p>
        <div class="Demo_xs">
          <el-form
            :model="formInlineBy"
            :inline="true"
            class="demo-form-inline"
            label-width="100px"
          >
            <el-form-item label="供货商">
              <el-input v-model="formInlineBy.supplierName" :disabled="true"></el-input>
            </el-form-item>
            <el-form-item label="采购单号">
              <el-input v-model="formInlineBy.orderNumber" :disabled="true"></el-input>
            </el-form-item>
          </el-form>
          <el-table
           :data="tableData_PRODUCT"
            height="400"
            :max-height="400">
            <el-table-column type="index" label="序号" align="center" width="70px">
            </el-table-column>
            <el-table-column label="产品图号" align="center" prop="productNumber">
            </el-table-column>
            <el-table-column label="产品名称" align="center" prop="productName">
            </el-table-column>
            <el-table-column label="采购数量" align="center" prop="number">
            </el-table-column>
            <el-table-column label="单价(元)" align="center" prop="price">

            </el-table-column>
            <el-table-column label="小计(元)" align="center" prop="xiaoji">
            </el-table-column>
            <el-table-column label="到货时间" align="center" prop="daohuoTime">
              <template v-slot="scope">
                <span>{{renderTime(scope.row.daohuoTime)}}</span>
              </template>
            </el-table-column>
            <el-table-column label="提前时间" align="center" prop="tiqianTixing">
              <template v-slot="scope">
                <span>{{scope.row.tiqianTixing+"天"}}</span>
              </template>
            </el-table-column>
          </el-table>
          <br/>
          <span>入库记录：</span>
          <el-table
            :data="tableData_PRODUCTRUKULOG"
            height="300"
            :max-height="300">
            <el-table-column type="index" label="序号" align="center" width="70px">
            </el-table-column>
            <el-table-column label="产品图号" align="center" prop="productNumber">
            </el-table-column>
            <el-table-column label="产品名称" align="center" prop="productName">
            </el-table-column>
            <el-table-column label="入库数量" align="center" prop="number">
            </el-table-column>
            <el-table-column label="成品入库数量" align="center" prop="chengpinkuNumber">
              <template v-slot="scope">
                <span>{{scope.row.chengpinkuNumber|groupTypeNULLTrans}}</span>
              </template>
            </el-table-column>
            <el-table-column label="废品入库数量" align="center" prop="feipinkuNumber">
              <template v-slot="scope">
                <span>{{scope.row.feipinkuNumber|groupTypeNULLTrans}}</span>
              </template>
            </el-table-column>
            <el-table-column label="入库时间" align="center">
              <template slot-scope="scope">
                <span>{{ renderTime(scope.row.operationTime) }}</span>
              </template>
            </el-table-column>
            <el-table-column label="状态" align="center">
              <template slot-scope="scope">
                <!--1:待入库或待出库,2:已完成-->
                <span v-if="scope.row.status==1">待入库</span>
                <span v-if="scope.row.status==2">已完成</span>
              </template>
            </el-table-column>
          </el-table>
          <p class="Purchase_Division"></p>
          <div class="from_towbs">
            <el-button @click="dialogBatab = false" type="info" size="small">取消</el-button>
          </div>
        </div>
      </el-dialog>
      <!--=======================申请入库弹框=================================================-->
      <el-dialog :visible.sync="dialogApplyRuKu" :modal-append-to-body="false" width="1200px">
<!--        <div class="herd_bud"></div>-->
        <div class="from_cg">入库申请</div>
        <br/>
        <p class="Purchase_Division"></p>
        <div class="Demo_xs">
          <el-table
            :data="tableData_PRODUCTRUKU"
            height="300"
            :max-height="300">
            <el-table-column label="产品图号" align="center">
              <template slot-scope="scope">
                <el-input disabled v-model="scope.row.productNumber"></el-input>
              </template>
            </el-table-column>
            <el-table-column label="产品名称" align="center">
              <template slot-scope="scope">
                <el-input disabled v-model="scope.row.productName"></el-input>
              </template>
            </el-table-column>
            <el-table-column label="采购数量" align="center">
              <template slot-scope="scope">
                <el-input disabled v-model="scope.row.number"></el-input>
              </template>
            </el-table-column>
            <el-table-column label="单价(元)" align="center">
              <template slot-scope="scope">
                <el-input disabled v-model="scope.row.price"></el-input>
              </template>
            </el-table-column>
            <el-table-column label="小计(元)" align="center">
              <template slot-scope="scope">
                <el-input disabled v-model="scope.row.xiaoji"></el-input>
              </template>
            </el-table-column>
            <el-table-column label="已入库" align="center">
              <template slot-scope="scope">
                <el-input disabled v-bind:value="scope.row.rukuNumber|groupTypeNULLTrans"></el-input>
              </template>
            </el-table-column>
            <el-table-column label="申请中" align="center">
              <template slot-scope="scope">
                <el-input disabled v-bind:value="scope.row.applyingNumber|groupTypeNULLTrans">
                </el-input>
              </template>
            </el-table-column>
            <el-table-column label="本次入库数" align="center" >
              <template slot-scope="scope">
                <el-input :disabled="scope.row.applyingNumber==scope.row.number" @input="checkNumber($event,scope.$index)" v-model="scope.row.rukuNumberNow" ></el-input>
              </template>
            </el-table-column>
          </el-table>
          <br/>
          <span>入库记录：</span>
          <el-table
            :data="tableData_PRODUCTRUKULOG"
            height="300"
            :max-height="300">
            <el-table-column type="index" label="序号" align="center" width="70px">
            </el-table-column>
            <el-table-column label="产品图号" align="center" prop="productNumber">
            </el-table-column>
            <el-table-column label="产品名称" align="center" prop="productName">
            </el-table-column>
            <el-table-column label="入库数量" align="center" prop="number">
            </el-table-column>
            <el-table-column label="成品入库数量" align="center" prop="chengpinkuNumber">
              <template v-slot="scope">
                <span>{{scope.row.chengpinkuNumber|groupTypeNULLTrans}}</span>
              </template>
            </el-table-column>
            <el-table-column label="废品入库数量" align="center" prop="feipinkuNumber">
              <template v-slot="scope">
                <span>{{scope.row.feipinkuNumber|groupTypeNULLTrans}}</span>
              </template>
            </el-table-column>
            <el-table-column label="入库时间" align="center">
              <template slot-scope="scope">
                <span>{{ renderTime(scope.row.operationTime) }}</span>
              </template>
            </el-table-column>
            <el-table-column label="状态" align="center">
              <template slot-scope="scope">
                <!--1:待入库或待出库,2:已完成-->
                <span v-if="scope.row.status==1">待入库</span>
                <span v-if="scope.row.status==2">已完成</span>
              </template>
            </el-table-column>
          </el-table>
          <p class="Purchase_Division"></p>
          <div class="from_towbs">
            <el-button @click="dialogApplyRuKu = false||applyRUKU()" type="primary" size="small">确定</el-button>
            <el-button @click="dialogApplyRuKu = false" type="info" size="small">取消</el-button>
          </div>
        </div>
      </el-dialog>

      <el-dialog
        title="驳回详情"
        :visible.sync="dialogVisible_bohui"
        width="50%"
        :modal-append-to-body="false">
        <ul :data="bohuilist" class="bohuizujian">
          <li>
            <span>审核日期</span>
            <el-input v-model="bohuilist.checkTime" style="width: 70%;" disabled></el-input>
          </li>
          <li>
            <span>审核人</span>
            <el-input v-model="bohuilist.userName" style="width: 70%;" disabled></el-input>
          </li>
          <li>
            <span>驳回理由</span>
            <el-input v-model="bohuilist.bohuiReason" style="width: 70%;" disabled></el-input>
          </li>
        </ul>
        <span slot="footer" class="dialog-footer">
    <el-button type="primary" @click="dialogVisible_bohui = false">返 回</el-button>
  </span>
      </el-dialog>
    </div>
  </div>
</template>

<script>

import axios from "axios";

export default {

  inject: ['reload'],
  computed: {
    autoHeightTable() {
      return document.documentElement.scrollHeight - 251 - 79;
    }
  },
  filters: {},
  data() {
    return {
      dialogVisible_bohui: false,
      bohuilist:{
        bohuiReason:"",
        checkTime:"",
        userName:"",
      },
      productTuHaoSec: "",//选中的产品图号
      allProducts: [],//所有的产品
      tableData_PRODUCT: [],//产品集合
      tableData_PRODUCTRUKU: [],//入库产品集合
      tableData_PRODUCTRUKULOG: [],//入库产品记录集合
      orderNo: "",//订单编号
      enterpriseNumberSeced: "",//选中的供应商的编号
      supplierSec: {},//选中的供应商对象
      //下拉选
      options_supplier: [],
      options_ownProduct: [],
      options: [],
      value: "",
      value1: "",
      optionsBp: [
        {
          value: "3",
          label: "3天"
        },
        {
          value: "5",
          label: "5天"
        },
        {
          value: "10",
          label: "10天"
        }
      ],
      //文本框
      formInline: {
        key: ""
      },
      start: "",
      end: "",
      formInlineBa: {},
      formInlineBy: {},
      //弹框/*========================================*/
      dialogTableVisible: false,
      dialogBatab: false,
      dialogApplyRuKu: false,
      //列表
      tableData: [],//新增采购的产品
      tableDataBs: [],
      //分页数据对象
      Pagination: {
        beginTime: "",
        endTime: "",
        key: "",
        total: 1,//总共页
        current: 1,//当前页
        pagesize: 9,//页面数据个数
      },
      no: "",
      jsondata: "",
      supplino: "",
      and: "",
      //新增
      supp: ""

    };
  },

  created() {
    this.getOwnSuppers();
    this.getList();
    this.getAllProducts();
  },
  methods: {
    getBOhui(checkflowId) {
      this.dialogVisible_bohui = true
      axios("/JX_java/procurement/getCheckFlowDetails?checkFlowId=" + checkflowId).then((res) => {
        let relse = res.data.data
        this.bohuilist = relse
      })
    },
    //检查填入的数据的合法性
    checkNumber(d,i){
      let dd = Number(this.tableData_PRODUCTRUKU[i].number) - (Number(this.tableData_PRODUCTRUKU[i].applyingNumber) + Number(this.tableData_PRODUCTRUKU[i].rukuNumber));
      if (this.tableData_PRODUCTRUKU[i].rukuNumberNow <= 0){
        this.$message.error("本次入库数量应大于0!")
      }
      if (parseInt(this.tableData_PRODUCTRUKU[i].rukuNumberNow)>dd) {
        this.$message.error("不能填写大于"+dd)
        this.tableData_PRODUCTRUKU[i].rukuNumberNow=0
        return
      }
    },
    //提交入库需求
    applyRUKU() {
      let message = JSON.parse(localStorage.getItem("message"));
      const data = [];
      this.tableData_PRODUCTRUKU.forEach(e => {
        if (e.rukuNumberNow != null) {
          let aa = {
            "number": parseInt(e.rukuNumberNow),
            "productId": e.id
          };
          data.push(aa)
        }
      })
      if (data.length == 0) {
        this.$message.error("未填写发货数量!");
        return
      }
      axios.post("/JX_java/procurement/caigou/applyRuku?userId=" + message.Id, data).then(res => {
        if (res.data.data == "操作成功") {
          this.$message.success(res.data.data);
          this.tableData_PRODUCTRUKU=[]
          this.dialogApplyRuKu=false;
        } else {
          this.$message.error(res.data.data);
        }
      })
    },
    //保存
    savePurchase() {
      const data = {
        "createUserid": 0,
        "createUsername": "",
        "createonTime": "",
        "id": 0,
        "isZhixing": 0,
        "orderNumber": "",
        "products": [],
        "status": 0,
        "supplierId": 0,
        "supplierName": "",
        "type": 0
      }
      this.tableData_PRODUCT.forEach(e => {
        const product = {
          "danwei": "",
          "daohuoTime": "",
          "id": 0,
          "number": 0,
          "orderId": 0,
          "price": 0,
          "productId": 0,
          "productName": "",
          "productNumber": "",
          "rukuNumber": 0,
          "tiqianTixing": 0,
          "xiaoji": 0,
          "xuhao": 0
        }
        product.productId = e.id;
        product.price = e.price;
        product.productNumber = e.productNumber
        product.productName = e.productName
        product.number = e.number;
        product.xiaoji = e.total;//
        product.daohuoTime = e.planArrivalTime
        product.tiqianTixing = e.tiqianTixing
        data.products.push(product)
      })
      let message = JSON.parse(localStorage.getItem("message"));
      data.createUserid = message.Id;
      data.createUsername = message.Name;
      data.supplierId = this.supplierSec.id;
      data.supplierName = this.supplierSec.enterpriseName;
      data.type = 1;
      data.orderNumber = this.orderNo;
      axios.post("/JX_java//procurement/caigou/caigouProducts?type=" + 1, data).then(res => {
        if (res.data.data == "操作成功") {
          this.$message.success(res.data.data);
          this.reload();
          this.dialogTableVisible = false
        } else {
          this.$message.error(res.data.data);
        }
      })
    },
    //格式化时间
    renderTime(date) {
      return date==null?"":date.substring(0, 10);
    },
    countXiaoJi(index) {
      this.tableData_PRODUCT[index].total = this.tableData_PRODUCT[index].price * this.tableData_PRODUCT[index].number;
    },
    currentProductSec(data, index) {
      this.options_ownProduct.forEach(e => {
        if (e.productTuhao == data) {
          this.tableData_PRODUCT[index].productName = e.productName;
          this.tableData_PRODUCT[index].productNumber = e.productTuhao
          this.tableData_PRODUCT[index].price = e.price
          this.tableData_PRODUCT[index].id = e.id
        }
      })

    },
    //获取列表信息
    getList() {
      const data = {
        "beginTime": this.Pagination.beginTime,
        "endTime": this.Pagination.endTime,
        "key": this.Pagination.key,
        "pageNum": this.Pagination.current,//页面编号
        "pageSize": this.Pagination.pagesize,//页面数量
        "type": 1
      }
      let message = JSON.parse(localStorage.getItem("message"));
      axios.post("/JX_java/procurement/caigou/getorderList?type=" + 1 + "&&userId=" + message.Id, data).then(res => {
        this.tableDataBs = res.data.data.content
        this.Pagination.total = res.data.data.totalPages
      })
    },
    //获取所有的供应商的集合
    getOwnSuppers() {
      let message = JSON.parse(localStorage.getItem("message"));
      axios.get("/JX_java/common/getSupperList?udserId=" + message.Id).then(res => {
        this.options_supplier = res.data.data;
      })
    },
    //将选中的供应商对象
    currentSupplierSec(data) {
      this.tableData_PRODUCT = [],
        this.options_supplier.forEach(e => {
          if (e.enterpriseNumber == data) {
            this.supplierSec = e;
          }
        })
      this.allProducts.forEach(e => {
        if (e.supplierId == this.supplierSec.id) {
          this.options_ownProduct = e.suppliercontractProducts;
        }
      })
    },
    getAllProducts() {
      let message = JSON.parse(localStorage.getItem("message"));
      axios.get("/JX_java/common/getSupperAndProductList?udserId=" + message.Id).then(res => {
        this.allProducts = res.data.data;
      })
    },
    //新增
    Newly() {
      this.dialogTableVisible = true;
    },
    //新增采购-------动态添加
    //动态添加行
    addRow() {
      const list = {};
      this.tableData_PRODUCT.push(list);
    },
    //新增采购-------动态删除
    resetForm(e) {
      this.tableData_PRODUCT.splice(e.$index, 1);
    },
    // 确认---保存
    Confirm() {
    },
    //入库==================确认
    ConfirmBts() {

    },
    //详情
    details(obj, type) {
      if (type == 1) {//申请入库
        axios.get("/JX_java/procurement/caigou/applyRukuDetails?poId=" + obj).then(res => {
          this.tableData_PRODUCTRUKULOG=[];
          this.tableData_PRODUCTRUKU=[]
          this.tableData_PRODUCTRUKULOG = res.data.data.warehouseLogs
          this.tableData_PRODUCTRUKU = res.data.data.orderProducts
          for(let i = 0 ; i<this.tableData_PRODUCT.length;i++){
            this.tableData_PRODUCTRUKU[i].xiaoji = this.tableData_PRODUCTRUKU[i].xiaoji.toFixed(2);
          }
        })
        this.dialogApplyRuKu = true;
      }
      if (type == 2) {//详情
        this.dialogBatab = true
        this.tableData_PRODUCT=[]
        axios.get("/JX_java/procurement/caigou/getOrderDetails?orderId="+obj).then(res=>{
          this.formInlineBy.orderNumber=res.data.data.orderNumber
          this.formInlineBy.supplierName=res.data.data.supplierName
          this.tableData_PRODUCT=res.data.data.products
          for(let i = 0 ; i<this.tableData_PRODUCT.length;i++){
            this.tableData_PRODUCT[i].xiaoji = this.tableData_PRODUCT[i].xiaoji.toFixed(2);
          }
        })
      }
    },
    // 分页
    handleCurrentChange(e) {
      this.Pagination.current = e
      this.getList()
    },
    // 日期改变
    chage(e) {
      if (e) {
        this.start =
          e[0].getFullYear() +
          "-" +
          (e[0].getMonth() + 1) +
          "-" +
          e[0].getDate();
        this.end =
          e[1].getFullYear() +
          "-" +
          (e[1].getMonth() + 1) +
          "-" +
          e[1].getDate();
      } else {
        this.start = "";
        this.end = "";
      }
      this.Pagination.beginTime = this.start
      this.Pagination.endTime = this.end
    },
    // 筛选
    onsubmit() {
      this.getList()
    }
  }
};
</script>

<style lang="scss" scoped>
@import "@/assets/scss/base.scss";
.bohuizujian{
  display: flex;
  flex-wrap: wrap;
  li{
    width: 33%;
    padding-top: 10px;
    text-align: center;
    span{
      display: inline-block;
      width: 25%;
    }
  }
}
//第一块儿
.incolumn_countr {
  margin-left: 15px;
  height: 50px;
  width: 97%;
  background-color: white;
  padding-top: 10px;
}

.Purchase_Division {
  border: 0.5px solid $linecolor;
}

.block {
  margin-top: -10px;
  margin-left: 20px;
  cursor: pointer;
}

.block_Math {
  cursor: pointer;
}

//第二块
.incolumn_from {
  margin-top: 15px;
  margin-left: 15px;
  width: 98%;
  height: 100%;
}

.from_bt {
  margin-top: -20px;
  margin-left: 10px;
  font-size: $font-size-medium-x;
  font-weight: bold;
}

.from_tab_btn {
  margin-top: 10px;
  text-align: center;
}

.from_cg {
  font-size: $font-size-medium-x;
  font-weight: bold;
  margin-top: -20px;
  margin-left: 10px;
}

.demo-form-inline {
  margin-top: 10px;
}

.from_tab_zt2 {
  margin-left: 10px;
  color: $font-size-medium-x;
  font-size: $font-size-medium;
}

.from_towb {
  margin-top: 10px;
}

.from_towbs {
  margin-top: 10px;
  text-align: center;
}

.ebtn {
  float: right;
  margin-right: 20px;
}

.bottom_slate {
  height: 60px;
  line-height: 40px;
  text-align: center;
}

.herd_bud {
  margin-top: -40px;
  height: 20px;
  width: 5px;
  background-color: rgb(52, 144, 231);
}
</style>
